<template>
  <a-card>
    <h2 class="mb-2">Echarts</h2>
    <div class="w-sm flex justify-between">
      <a-link @click="openEcharts('graph')">曲线图</a-link>
      <a-link>折线图</a-link>
      <a-link>扇形图</a-link>
      <a-link>地图</a-link>
    </div>
  </a-card>
  <!-- 曲线图 -->
  <Graph ref="graphRef" />
</template>

<script setup>
import { ref } from 'vue'
import Graph from './Graph.vue'
const graphRef = ref(null)
const openEcharts = (type) => {
  if (type == 'graph') {
    graphRef.value.open()
  }
}
</script>

<style lang="scss" scoped>
</style>